<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


Route::get('/', function () {
    return view('welcome');
});

Route::get('logs', 'LogViewerController@index');

Route::post('user/login', 'UserMgmrController@login');
Route::get('user/logout', 'UserMgmrController@logout');
Route::get('user/regist', 'UserMgmrController@regist');
Route::post('user/v1/regist', 'UserMgmrController@registV1');
Route::get('user/request_code', 'UserMgmrController@requestVerifyCode');
Route::get('user/deleteUser', 'UserMgmrController@delete');
Route::post('user/update', 'UserMgmrController@updateUserInfo');
Route::post('user/avatar', 'UserMgmrController@changeAvatar');
Route::get('user/systemMessage', 'UserMgmrController@systemMessage');

Route::get('user/loginAdmin', 'AdminController@login');
Route::get('user/deleteAdmin', 'AdminController@deleteAdmin');
Route::get('user/addAdmin', 'AdminController@regist');

Route::get('user/listTask', 'TowerController@listTasks');
Route::get('user/addTask', 'TowerController@addTask');
Route::get('user/deleteTask', 'TowerController@deleteTask');
Route::get('user/excel', 'TowerController@excel');

//http://localhost/tt201801/public/index.php/user/listContact?sid=112233445544332211&user_id=3&type=full&keyword=22
Route::get('user/listContact', 'ContactController@listTasks');
Route::get('user/contactDetail', 'ContactController@getContactDetail');
Route::post('user/addContact', 'ContactController@addTask');
Route::post('user/deleteContact', 'ContactController@deleteTask');

Route::get('user/login.html', 'PageController@pageLogin');
Route::get('user/add_admin.html', 'PageController@pageAddAdmin');
Route::get('user/add_user.html', 'PageController@pageAddUser');
Route::get('user/index.html', 'PageController@pageIndex');
Route::get('user/admin_mgmr.html', 'PageController@pageAdminMgmr');
Route::get('user/task_mgmr.html', 'PageController@pageTaskMgmr');
Route::get('user/task_info.html', 'PageController@taskInfo');
Route::get('user/contact_mgmr.html', 'PageController@pageContactMgmr');
Route::get('user/contact_info.html', 'PageController@contactInfo');
Route::get('user/user_mgmr.html', 'PageController@pageUserMgmr');


//Route::get('user/listTask.html', 'TowerController@pageList');
